Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Template Java class name substitution #522

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

KshKnsl
Copy link
Contributor

@KshKnsl KshKnsl commented Jan 11, 2025

Fixing #512

Key Enhancement:

Auto-Class Naming for Java:
When creating a new Java file via Competitive Companion, the placeholder CLASS_NAME in the Java template is automatically replaced with the problem's name.
This ensures that the Java class name matches the problem name, complying with Java's requirement for public class names to match the filename.

Testing Instructions:

Ensure your Java template includes CLASS_NAME as a placeholder for the class name.
Use Competitive Companion to create a new Java file.
Verify that the generated file replaces CLASS_NAME with the problem name correctly.

Additional Notes:

This feature is specific to Java but can be adapted for other languages with similar requirements.
Also for non template file, we can have some boiler for each language.

Example

image

@AgX111
Copy link

AgX111 commented Jan 17, 2025

This is such a QOL for Java users!

@agrawal-d
Copy link
Owner

agrawal-d commented Jan 19, 2025

Thanks @KshKnsl . Can you add an example with screenshots in the docs? Also, can you make the description in the setting more detailed ( you can add an example in the description too ).

@agrawal-d agrawal-d self-requested a review January 19, 2025 06:09
@agrawal-d agrawal-d self-assigned this Jan 19, 2025
@KshKnsl
Copy link
Contributor Author

KshKnsl commented Jan 20, 2025

Thanks @KshKnsl . Can you add an example with screenshots in the docs? Also, can you make the description in the setting more detailed ( you can add an example in the description too ).

Done

@agrawal-d
Copy link
Owner

Looks almost ready! The screenshot in the issue description is perfect - can you please that in the docs too?

@agrawal-d agrawal-d merged commit 5bfc4eb into agrawal-d:main Jan 21, 2025
4 checks passed
@agrawal-d
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants